<!DOCTYPE html>
<html>
	<!--3:实现附件 全选的功能-->
	<head>
		<meta charset="utf-8">	
		<title>全选效果</title>
		<link rel="stylesheet" type="text/css" href="../css/3.css"/>
	
	</head>
	<body>
		<div class="aa">
			<img src="../img/list_bg.gif" >
			<div class="bb">
				<form action="#" method="get">
					<ul class="cc">
						<li class="li1"><input id="chec" type="checkbox" onclick="bott()"><strong>全选</strong></li>
						<li class="li3"><strong>商品图片</strong></li>
						<li class="li4"><strong>商品名称/出售者/联系方式</strong></li>
						<li class="li5"><strong>价格</strong></li>
					</ul>
					<p>
					<ul class="dd">
						<li class="li1"><input id="ch1" type="checkbox"></li>
						<li class="li2" style="margin-top: 100px; margin-left: 30px;"><img src="../img/list0.jpg"></li>
						<li class="li3" style="padding-left: 300px;padding: 100px;">杜比环绕,家庭影院必备,超真实享受<br/><span>出售者:ling112233</span></li><br/>
						<li class="li4"><img src="../img/online_pic.gif"></li>
						<li class="li5"><img src="../img/list_tool_fav1.gif"></li>
						<li class="li6"><a href="#">收藏</a></li>
						<li class="li7">一口价</li>
						<li class="li8"><input type="text" style="width: 45px;"></li>
					</ul>
					</p>
					<p>
					<ul class="ee">
						<li class="li1"><input  id="ch2" type="checkbox"></li>
						<li class="li2"><img src="../img/list1.jpg"></li>
						<li class="li3">NVDIA&nbsp;9999GT&nbsp;512MB&nbsp;256bit极品显卡,不容错过<br/><span>出售者:aipiaopiao110</span></li>
						<li class="li4"><img src="../img/online_pic.gif"></li>
						<li class="li5"><img src="../img/list_tool_fav1.gif"></li>
						<li class="li6"><a href="#">收藏</a></li>
						<li class="li7">一口价</li>
						<li class="li8"><input type="text" style="width: 45px;"></li>
					</ul>
					</p>
					<p>
					<ul class="ff">
						<li class="li1"><input id="ch3" type="checkbox"></li>
						<li class="li2"><img src="../img/list2.jpg"></li>
						<li class="li3">精品热卖;高清晰,30寸等离子电视<br/><span>出售者:阳光的挣扎</span></li>
						<li class="li4"><img src="../img/online_pic.gif"></li>
						<li class="li5"><img src="../img/list_tool_fav1.gif"></li>
						<li class="li6"><a href="#">收藏</a></li>
						<li class="li7">一口价</li>
						<li class="li8"><input type="text" style="width: 45px;"></li>
					</ul>
					</p>
					<ul class="hh">
						<li class="li1"><input id="ch4" type="checkbox"></li>
						<li class="li2"><img src="../img/list3.jpg"></li>
						<li class="li3">sony索尼家用最新款笔记本<br/><span>出售者:疯狂的挽无</span></li>
						<li class="li4"><img src="../img/online_pic.gif"></li>
						<li class="li5"><img src="../img/list_tool_fav1.gif"></li>
						<li class="li6"><a href="#">收藏</a></li>
						<li class="li7">一口价</li>
						<li class="li8"><input type="text" style="width: 45px;"></li>
					</ul>
				</form>
			</div>
		</div>
		<script type="text/javascript">
			var check=document.getElementById("ch1");
			var check1=document.getElementById("ch2");
			var check2=document.getElementById("ch3");
			var check3=document.getElementById("ch4");
			var checke=[check,check1,check2,check3];
			var check4=document.getElementById("chec");
			function bott(){
					for(var i=0;i<checke.length;i++){
						checke[i].checked=check4;
					
			}
			}
		</script>
	</body>
</html>
